From: Jasper St. Pierre Date: Fri, 31 May 2013 23:03:09 +0000 (-0400) Subject: network: Always show the VPN indicator when connected to VPN X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4043 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=35a7a3c1acbb2a8357d1286371d42f54d66effa4;p=gnome-shell.git network: Always show the VPN indicator when connected to VPN The new designs ask for this. https://bugzilla.gnome.org/show_bug.cgi?id=701954 --- diff --git a/js/ui/status/network.js b/js/ui/status/network.js index a1b6a5c82..3e64fd9b3 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -1395,8 +1395,8 @@ const NMApplet = new Lang.Class({ _init: function() { this.parent('network-offline-symbolic', _('Network')); - this.secondaryIcon = this.addIcon(new Gio.ThemedIcon({ name: 'network-vpn-symbolic' })); - this.secondaryIcon.hide(); + this._vpnIcon = this.addIcon(null); + this._vpnIcon.hide(); // Device types this._dtypes = { }; @@ -2075,21 +2075,14 @@ const NMApplet = new Lang.Class({ // update VPN indicator if (this._vpnConnection) { - let vpnIconName = 'network-vpn-symbolic'; if (this._vpnConnection.state == NetworkManager.ActiveConnectionState.ACTIVATING) - vpnIconName = 'network-vpn-acquiring-symbolic'; - - // only show a separate icon when we're using a wireless/3g connection - if (mc._section == NMConnectionCategory.WIRELESS || - mc._section == NMConnectionCategory.WWAN) { - this.secondaryIcon.icon_name = vpnIconName; - this.secondaryIcon.show(); - } else { - this.setIcon(vpnIconName); - this.secondaryIcon.hide(); - } + this._vpnIcon.icon_name = 'network-vpn-acquiring-symbolic'; + else + this._vpnIcon.icon_name = 'network-vpn-symbolic'; + + this._vpnIcon.show(); } else { - this.secondaryIcon.hide(); + this._vpnIcon.hide(); } // cleanup stale signal connections